<?php
/* @var $this PersonalController */
/* @var $model Personal */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'personal-form',
  
	'enableAjaxValidation'=>false,
    'focus'=>array($model,'personal_id'),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'personal_id'); ?>
		<?php echo $form->textField($model,'personal_id',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'personal_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'p_name'); ?>
		<?php echo $form->textField($model,'p_name',array('size'=>2,'maxlength'=>2)); ?>
		<?php echo $form->error($model,'p_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'name_sur'); ?>
		<?php echo $form->textField($model,'name_sur',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'name_sur'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'sex'); ?>
		<?php echo $form->textField($model,'sex',array('size'=>1,'maxlength'=>1)); ?>
		<?php echo $form->error($model,'sex'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'posit_id'); ?>
		<?php echo $form->dropDownList($model,'posit_id',array('size'=>1,'maxlength'=>1)); ?>
		<?php echo $form->error($model,'posit_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'depart_id'); ?>
		<?php echo $form->dropDownList($model,'depart_id',array('size'=>0,'maxlength'=>0)); ?>
		<?php echo $form->error($model,'depart_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status_id'); ?>
		<?php echo $form->dropDownList($model,'status_id',array('size'=>0,'maxlength'=>0)); ?>
		<?php echo $form->error($model,'status_id'); ?>
	</div>

	<div class="row">
            <?php echo $form->labelEx($model,'birthday'); ?>
<?php// echo $form->textField($model,'dob'); ?>
              <?php
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'name'=>'dob',
'attribute'=>'birthday',
'model'=>$model,
'language'=>'th',
'options'=>array(
'showAnim'=>'fold',
  
'dateFormat'=>'dd/mm/yy',
'changeMonth'=>true,
'changeYear'=>true,
),
'htmlOptions'=>array(
'style'=>'height:20px;',
'style'=>'width:120px;',
),
));
?>
		<?php echo $form->error($model,'birthday'); ?>
            

	</div>

	

	
	<div class="row">
		<?php echo $form->labelEx($model,'address'); ?>
		<?php echo $form->textField($model,'address',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'address'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'prov_id'); ?>
		<?php echo $form->dropDownList($model,'prov_id',array('size'=>0,'maxlength'=>0)); ?>
		<?php echo $form->error($model,'prov_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'zipcode'); ?>
		<?php echo $form->textField($model,'zipcode',array('size'=>1,'maxlength'=>1)); ?>
		<?php echo $form->error($model,'zipcode'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'tel'); ?>
		<?php echo $form->textField($model,'tel',array('size'=>3,'maxlength'=>3)); ?>
		<?php echo $form->error($model,'tel'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'origin_id'); ?>
		<?php echo $form->dropDownList($model,'origin_id',array('size'=>1,'maxlength'=>1)); ?>
		<?php echo $form->error($model,'origin_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'nation_id'); ?>
		<?php echo $form->dropDownList($model,'nation_id',array('size'=>1,'maxlength'=>1)); ?>
		<?php echo $form->error($model,'nation_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'religious_id'); ?>
		<?php echo $form->dropDownList($model,'religious_id',array('size'=>0,'maxlength'=>0)); ?>
		<?php echo $form->error($model,'religious_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'personalstu'); ?>
		<?php echo $form->dropDownList($model,'personalstu',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'personalstu'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'degree_edu'); ?>
		<?php echo $form->dropDownList($model,'degree_edu',array('size'=>11,'maxlength'=>11)); ?>
		<?php echo $form->error($model,'degree_edu'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'schoolfrom'); ?>
		<?php echo $form->dropDownList($model,'schoolfrom',array('size'=>11,'maxlength'=>11)); ?>
		<?php echo $form->error($model,'schoolfrom'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->textField($model,'email',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'program'); ?>
		<?php echo $form->dropDownList($model,'program',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'program'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'degree'); ?>
		<?php echo $form->dropDownList($model,'degree',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'degree'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'father'); ?>
		<?php echo $form->textField($model,'father',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'father'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'mother'); ?>
		<?php echo $form->textField($model,'mother',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'mother'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'personalimage'); ?>
		<?php echo $form->textArea($model,'personalimage',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'personalimage'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->